<template>
	<view class="comment">
		<view class="title">
			最新评价：
		</view>
		<view v-if="CommentData==null">
			暂无评价
		</view>
		<view v-else class="content">
			<van-rate v-model="CommentData.star" :size="23" color="#ffd21e" void-icon="star" void-color="#eee" readonly />
			<view style="margin-top:20upx;font-size: 32upx;">
				{{CommentData.content}}
			</view>
			<view>
				<block v-for="(item,index) in CommentData.imgs.length>=3?3:CommentData.imgs.length" :key="item+''">
					<image :src="CommentData.imgs[index].url" mode="aspectFill" style="width: 100upx;height: 100upx;margin-top:20upx;;"></image>
				</block>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: 3,
				flag:1
			}
		},
		props: {
			CommentData: {
				type: Object
			}
		}
	}
</script>

<style>
	.comment {
		padding: 25upx;
		background-color: #FFF;
		display: flex;
		align-items: center;
		margin: 10upx 0;
		font-size: 28upx;
	}

	.comment .title {
		min-width: 140upx;
		text-align: left;
		color: #999;
	}
	.comment .content {
		display: flex;
		align-items: center;
		flex-direction: column;
		flex: 1;
	}
	
</style>
